/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ua.i.kotionokyurievna.jewelryweb.dao;

import java.util.HashMap;
import java.util.Map;
import javax.ejb.Stateless;
import ua.i.kotionokyurievna.jewelryweb.entities.Person;

/**
 *
 * @author Kateryna_Reznik
 */
@Stateless
public class PersonDAO extends GenericDAO<Person> {
    
    public PersonDAO(){
        super(Person.class);
    }
    
    public void savePerson( Person person ){
        super.save(person);
    }
    
    public Person findPersonByLogin(String login){
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("login", login);     
 
        return super.findOneResult( Person.FIND_BY_LOGIN, parameters);
    }
    
}
